# OS Environment
ARCH := $(shell uname -m)
COMPILE = gmcs

# Flags
#DEBUG_FLAGS = -g
#DEF_FLAGS = -D${ARCH} -pthread
#OPT_FLAGS = -O3
#WARN_FLAGS = -Wall

# Project
SRCFILES = \
    src/containers/FixedQueue.cs \
    src/containers/SinglyLinkedList.cs \
    src/numeric/Base2.cs

all:
	@echo -e "\033[7m[Building...]\033[0m"
	@mkdir -p build/lib
	${COMPILE} -t:library -out:build/lib/PromoteSharp.dll ${SRCFILES}

#all: install
#
#clean: 
#	@echo -e "\033[7m[Cleaning...]\033[0m"
#	rm -f ${OBJDIROBJS} ${LIBNAME} ${LIBDIR}/${LIBNAME} include/*

#install: lib
#	@echo -e "\033[7m[Installing...]\033[0m"
#	cp ${HEADERS} include/

#lib: compile_echo ${OBJDIROBJS}
#	@echo -e "\033[7m[Creating library...]\033[0m"
#	ar rcs ${LIBDIR}/${LIBNAME} ${OBJDIROBJS}

#compile_echo:
#	@echo -e "\033[7m[Compiling...]\033[0m"

#${OBJDIR}/%.o: src/%.cpp ${HEADERS}
#	${CXX} ${DEBUG_FLAGS} ${DEF_FLAGS} ${OPT_FLAGS} ${WARN_FLAGS} -Isrc/common -Isrc/compare -Isrc/containers -Isrc/hash -Isrc/memory -Isrc/numeric -Isrc/system -Isrc/text -c src/$*.cpp -o $@

.PHONY: all clean

